﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="Silvester.App"
             xmlns:cit="clr-namespace:CompletIT.Windows.Controls;assembly=LinkLabel"
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             xmlns:local="clr-namespace:Silvester">
    <Application.Resources>
        <local:UserLinkConverter x:Key="UserLinkConverter" />
        <Style x:Key="Status"
               TargetType="StackPanel">
            <!--<Setter Property="Background" Value="#FF343434" />-->
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Orientation"
                    Value="Horizontal" />
        </Style>

        <Style x:Key="UserProfileImage"
               TargetType="Image">
            <Setter Property="Width"
                    Value="40" />
            <Setter Property="Height"
                    Value="40" />
            <Setter Property="Margin"
                    Value="0,0,5,0" />
            <Setter Property="VerticalAlignment"
                    Value="Top" />
        </Style>

        <Style x:Key="StatusData"
               TargetType="StackPanel">
            <Setter Property="VerticalAlignment"
                    Value="Stretch" />
        </Style>

        <Style x:Key="UserName"
               TargetType="HyperlinkButton">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFFFFFFF" />
            <Setter Property="FontSize"
                    Value="9" />
        </Style>

        <Style x:Key="StatusText"
               TargetType="cit:LinkLabel">
            <Setter Property="Width"
                    Value="145" />
        </Style>

        <Style x:Key="LinkLabelText"
               TargetType="TextBlock">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFC5C5C5" />
            <Setter Property="FontSize"
                    Value="9" />
            <!--<Setter Property="TextWrapping"
                    Value="Wrap" />-->
        </Style>

        <Style x:Key="LinkLabelLink"
               TargetType="HyperlinkButton">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFFFFFFF" />
            <Setter Property="FontSize"
                    Value="9" />
            <!--<Setter Property="TextWrapping" Value="Wrap" />-->
            <Setter Property="Margin"
                    Value="0,2,0,0" />
        </Style>

        <Style x:Key="StatusTimeGone"
               TargetType="TextBlock">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFFFFFFF" />
            <Setter Property="FontSize"
                    Value="9" />
        </Style>

        <Style x:Key="LastUpdatedLabel"
               TargetType="TextBlock">
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFC5C5C5" />
            <Setter Property="FontSize"
                    Value="9" />
            <Setter Property="Margin"
                    Value="5,0,5,0" />
            <Setter Property="Grid.Column"
                    Value="0" />
        </Style>

        <Style x:Key="LastUpdatedValue"
               TargetType="TextBlock">
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Foreground"
                    Value="#FFC5C5C5" />
            <Setter Property="FontSize"
                    Value="9" />
            <Setter Property="Grid.Column"
                    Value="1" />
        </Style>

        <Style x:Key="StatusMessage"
               TargetType="TextBlock">
            <Setter Property="HorizontalAlignment"
                    Value="Right" />
            <Setter Property="Foreground"
                    Value="Red" />
            <Setter Property="FontSize"
                    Value="9" />
            <Setter Property="Margin"
                    Value="0,0,5,0" />
            <Setter Property="Grid.Column"
                    Value="2" />
            <!--<Setter Property="TextWrapping" Value="Wrap" />-->
        </Style>

        <Style x:Key="LoaderStyle"
               TargetType="StackPanel">
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="HorizontalAlignment"
                    Value="Right" />
            <Setter Property="Margin"
                    Value="0,0,5,0" />
            <Setter Property="Grid.Column"
                    Value="2" />
            <Setter Property="Orientation"
                    Value="Horizontal" />
        </Style>

        <Style x:Key="LoadingText"
               TargetType="TextBlock">
            <Setter Property="FontSize"
                    Value="10" />
            <Setter Property="Foreground"
                    Value="#FFFFFFFF" />
        </Style>

        <Style x:Key="LayoutRoot"
               TargetType="StackPanel">
            <Setter Property="Background"
                    Value="Black" />
        </Style>

        <Style x:Key="ActionBar"
               TargetType="Grid">
            <Setter Property="Height"
                    Value="27" />
            <Setter Property="VerticalAlignment"
                    Value="Top" />
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="#FF919191"
                                      Offset="0" />
                        <GradientStop Color="#FF3F3D3D"
                                      Offset="0.442" />
                        <GradientStop Color="#FF000000"
                                      Offset="0.567" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        <vsm:Style x:Key="RefreshButtonStyle"
                   TargetType="Button">
            <Setter Property="Width"
                    Value="50" />
            <Setter Property="Height"
                    Value="20" />
            <Setter Property="HorizontalAlignment"
                    Value="Left" />
            <Setter Property="Margin"
                    Value="5" />
            <Setter Property="Background"
                    Value="Gray" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Foreground"
                    Value="#FFFFFFFF" />
            <Setter Property="FontSize"
                    Value="9" />
            <vsm:Setter Property="Template">
                <vsm:Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid x:Name="RefreshButton"
                              RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Unfocused">
                                        <Storyboard />
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                           Duration="00:00:00.0010000"
                                                                           Storyboard.TargetName="rectangle"
                                                                           Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="0.5" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                           Duration="00:00:00.0010000"
                                                                           Storyboard.TargetName="rectangle"
                                                                           Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                          Duration="00:00:00.0010000"
                                                                          Storyboard.TargetName="rectangle"
                                                                          Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00"
                                                                     Value="#FF343434" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                           Duration="00:00:00.0010000"
                                                                           Storyboard.TargetName="rectangle"
                                                                           Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="1" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                           Duration="00:00:00.0010000"
                                                                           Storyboard.TargetName="rectangle"
                                                                           Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                           Duration="00:00:00.0010000"
                                                                           Storyboard.TargetName="rectangle"
                                                                           Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="0" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard />
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard />
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch"
                                  RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <Rectangle Stretch="Fill"
                                           StrokeLineJoin="Round"
                                           HorizontalAlignment="Stretch"
                                           VerticalAlignment="Stretch"
                                           Stroke="#FF000000"
                                           Margin="1,1,1,1"
                                           RadiusX="5"
                                           RadiusY="5"
                                           x:Name="rectangle">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFFFFF"
                                                          Offset="0" />
                                            <GradientStop Color="#FF343434"
                                                          Offset="0.5" />
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Grid>
                    </ControlTemplate>
                </vsm:Setter.Value>
            </vsm:Setter>
        </vsm:Style>

        <Style x:Key="FollowMeLinkStyle"
               TargetType="HyperlinkButton">
            <Setter Property="HorizontalAlignment"
                    Value="Right" />
            <Setter Property="Margin"
                    Value="5" />
            <Setter Property="VerticalAlignment"
                    Value="Center" />
            <Setter Property="Foreground"
                    Value="White" />
            <Setter Property="TargetName"
                    Value="_blank" />
            <Setter Property="FontSize"
                    Value="9" />
        </Style>

        <Style x:Key="StatusItemStyle"
               TargetType="ListBoxItem">
            <Setter Property="Template">
                <Setter.Value>

                    <ControlTemplate TargetType="ListBoxItem">

                        <Border x:Name="itemBorder"
                                Background="#FF343434"
                                Padding="5,7,5,7"
                                CornerRadius="10"
                                Margin="1">
                            <vsm:VisualStateManager.VisualStateGroups>

                                <vsm:VisualStateGroup x:Name="SelectionStates">
                                    <vsm:VisualState x:Name="Selected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                          Storyboard.TargetName="itemBorder"
                                                                          Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00.0000000"
                                                                     Value="#FF515151" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Unselected">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                          Storyboard.TargetName="itemBorder"
                                                                          Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00.0000000"
                                                                     Value="#FF343434" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="SelectedUnfocused">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                          Storyboard.TargetName="itemBorder"
                                                                          Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00.0000000"
                                                                     Value="#FF515151" />
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>

                                    <vsm:VisualStateGroup.Transitions>
                                        <vsm:VisualTransition To="Unselected"
                                                              GeneratedDuration="00:00:00.3000000">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                              Storyboard.TargetName="itemBorder"
                                                                              Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                    <SplineColorKeyFrame KeyTime="00:00:00.2000000"
                                                                         Value="#FF343434" />
                                                </ColorAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </vsm:VisualTransition>

                                        <vsm:VisualTransition To="Selected"
                                                              GeneratedDuration="00:00:00.3000000">
                                            <Storyboard>
                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                              Storyboard.TargetName="itemBorder"
                                                                              Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                    <SplineColorKeyFrame KeyTime="00:00:00.2000000"
                                                                         Value="#FF515151" />
                                                </ColorAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </vsm:VisualTransition>

                                    </vsm:VisualStateGroup.Transitions>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <StackPanel Style="{StaticResource Status}">
                                <Image Source="{Binding User.ProfileImageUrl}"
                                       Style="{StaticResource UserProfileImage}" />
                                <StackPanel Style="{StaticResource StatusData}">
                                    <HyperlinkButton Content="{Binding User.ScreenName}"
                                                     NavigateUri="{Binding User.ScreenName, Converter={StaticResource UserLinkConverter}}"
                                                     TargetName="_blank"
                                                     Style="{StaticResource UserName}" />
                                    <cit:LinkLabel Text="{Binding Text}"
                                                   TextStyle="{StaticResource LinkLabelText}"
                                                   LinkStyle="{StaticResource LinkLabelLink}"
                                                   Style="{StaticResource StatusText}" />
                                    <TextBlock Text="{Binding TimeGone}"
                                               Style="{StaticResource StatusTimeGone}" />
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <vsm:Style x:Key="ScrollBarStyle"
                   TargetType="ScrollBar">
            <vsm:Setter Property="Template">
                <vsm:Setter.Value>
                    <ControlTemplate TargetType="ScrollBar">
                        <Grid x:Name="Root">
                            <Grid.Resources>
                                <ControlTemplate x:Key="RepeatButtonTemplate"
                                                 TargetType="RepeatButton">
                                    <Grid x:Name="Root"
                                          Background="Transparent">
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualState x:Name="Normal" />
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalIncrementTemplate"
                                                 TargetType="RepeatButton">
                                    <Grid x:Name="Root"
                                          Background="#00000000">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="35*" />
                                            <ColumnDefinition Width="30*" />
                                            <ColumnDefinition Width="35*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="25*" />
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="25*" />
                                        </Grid.RowDefinitions>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="#FF557E9A" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                            <vsm:VisualStateGroup x:Name="FocusStates">
                                                <vsm:VisualState x:Name="Focused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Unfocused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Path x:Name="ButtonVisual"
                                              Grid.Column="1"
                                              Grid.Row="1"
                                              Stretch="Fill"
                                              Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush Color="#FF313131"
                                                                 x:Name="ButtonColor" />
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="FocusVisual"
                                                   IsHitTestVisible="false"
                                                   Opacity="0"
                                                   Grid.ColumnSpan="3"
                                                   Grid.RowSpan="3"
                                                   Fill="#00000000"
                                                   Stroke="#666666"
                                                   StrokeDashArray=".2 5"
                                                   StrokeDashCap="Round" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalDecrementTemplate"
                                                 TargetType="RepeatButton">
                                    <Grid x:Name="Root"
                                          Background="#00000000">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="35*" />
                                            <ColumnDefinition Width="30*" />
                                            <ColumnDefinition Width="35*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="25*" />
                                            <RowDefinition Height="50*" />
                                            <RowDefinition Height="25*" />
                                        </Grid.RowDefinitions>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="#FF557E9A" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                            <vsm:VisualStateGroup x:Name="FocusStates">
                                                <vsm:VisualState x:Name="Focused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Unfocused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Path x:Name="ButtonVisual"
                                              Grid.Column="1"
                                              Grid.Row="1"
                                              Stretch="Fill"
                                              Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z ">
                                            <Path.Fill>
                                                <SolidColorBrush Color="#FF313131"
                                                                 x:Name="ButtonColor" />
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="FocusVisual"
                                                   IsHitTestVisible="false"
                                                   Opacity="0"
                                                   Grid.ColumnSpan="3"
                                                   Grid.RowSpan="3"
                                                   Fill="#00000000"
                                                   Stroke="#666666"
                                                   StrokeDashArray=".2 5"
                                                   StrokeDashCap="Round" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalIncrementTemplate"
                                                 TargetType="RepeatButton">
                                    <Grid x:Name="Root"
                                          Background="#00000000">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="25*" />
                                            <ColumnDefinition Width="50*" />
                                            <ColumnDefinition Width="25*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="35*" />
                                            <RowDefinition Height="30*" />
                                            <RowDefinition Height="35*" />
                                        </Grid.RowDefinitions>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="#FFAAAAAA" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                            <vsm:VisualStateGroup x:Name="FocusStates">
                                                <vsm:VisualState x:Name="Focused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Unfocused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Path x:Name="ButtonVisual"
                                              Grid.Column="1"
                                              Grid.Row="1"
                                              Stretch="Fill"
                                              Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                              Stroke="#FFAAAAAA">
                                            <Path.Fill>
                                                <SolidColorBrush Color="#FF5A5A5A"
                                                                 x:Name="ButtonColor" />
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="FocusVisual"
                                                   IsHitTestVisible="false"
                                                   Opacity="0"
                                                   Grid.ColumnSpan="3"
                                                   Grid.RowSpan="3"
                                                   Fill="#00000000"
                                                   Stroke="#666666"
                                                   StrokeDashArray=".2 5"
                                                   StrokeDashCap="Round" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalDecrementTemplate"
                                                 TargetType="RepeatButton">
                                    <Grid x:Name="Root"
                                          Background="#00000000">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="25*" />
                                            <ColumnDefinition Width="50*" />
                                            <ColumnDefinition Width="25*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="35*" />
                                            <RowDefinition Height="30*" />
                                            <RowDefinition Height="35*" />
                                        </Grid.RowDefinitions>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.2"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="#FFAAAAAA" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ButtonVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                            <vsm:VisualStateGroup x:Name="FocusStates">
                                                <vsm:VisualState x:Name="Focused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Visible</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Unfocused">
                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                                       Storyboard.TargetName="FocusVisual"
                                                                                       Storyboard.TargetProperty="Visibility">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <vsm:Visibility>Collapsed</vsm:Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Path x:Name="ButtonVisual"
                                              Grid.Column="1"
                                              Grid.Row="1"
                                              Stretch="Fill"
                                              Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                              Stroke="#FFAAAAAA"
                                              StrokeThickness="1">
                                            <Path.Fill>
                                                <SolidColorBrush Color="#FF5A5A5A"
                                                                 x:Name="ButtonColor" />
                                            </Path.Fill>
                                        </Path>
                                        <Rectangle x:Name="FocusVisual"
                                                   IsHitTestVisible="false"
                                                   Opacity="0"
                                                   Grid.ColumnSpan="3"
                                                   Grid.RowSpan="3"
                                                   Fill="#00000000"
                                                   Stroke="#66666666"
                                                   StrokeDashArray=".2 5"
                                                   StrokeDashCap="Round" />
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="VerticalThumbTemplate"
                                                 TargetType="Thumb">
                                    <Grid>
                                        <Grid.Resources>
                                            <SolidColorBrush x:Key="Background"
                                                             Color="#FF003255" />
                                            <Color x:Key="LinearBevelLightStartColor">#FF5A5A5A</Color>
                                            <Color x:Key="LinearBevelLightEndColor">#FF5A5A5A</Color>
                                            <Color x:Key="LinearBevelDarkStartColor">#FF5A5A5A</Color>
                                            <Color x:Key="LinearBevelDarkEndColor">#FF5A5A5A</Color>
                                            <Color x:Key="HoverLinearBevelLightStartColor">#FFAAAAAA</Color>
                                            <Color x:Key="HoverLinearBevelLightEndColor">#FFAAAAAA</Color>
                                            <Color x:Key="HoverLinearBevelDarkStartColor">#FFAAAAAA</Color>
                                            <Color x:Key="HoverLinearBevelDarkEndColor">#FFAAAAAA</Color>
                                        </Grid.Resources>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.1"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelDarkStartColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelDarkEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Grid x:Name="ThumbVisual">
                                            <Rectangle Margin="2.5,.5,2.5,.5"
                                                       x:Name="Background"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Fill="{StaticResource Background}" />
                                            <Rectangle Margin="2,0,2,0"
                                                       x:Name="rectangle"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Stroke="#FF777777"
                                                       StrokeThickness="1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="1,0.5"
                                                                         StartPoint="0,0.5">
                                                        <GradientStop Color="{StaticResource LinearBevelLightStartColor}"
                                                                      Offset="0"
                                                                      x:Name="LinearBevelLightStart" />
                                                        <GradientStop Color="{StaticResource LinearBevelLightEndColor}"
                                                                      Offset="0.35"
                                                                      x:Name="LinearBevelLightEnd" />
                                                        <GradientStop Color="{StaticResource LinearBevelDarkStartColor}"
                                                                      Offset="0.35"
                                                                      x:Name="LinearBevelDarkStart" />
                                                        <GradientStop Color="{StaticResource LinearBevelDarkEndColor}"
                                                                      Offset="1"
                                                                      x:Name="LinearBevelDarkEnd" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle Margin="3,1,3,1"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Fill="#00000000" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                                <ControlTemplate x:Key="HorizontalThumbTemplate"
                                                 TargetType="Thumb">
                                    <Grid>
                                        <Grid.Resources>
                                            <SolidColorBrush x:Key="Background"
                                                             Color="#FF003255" />
                                            <Color x:Key="LinearBevelLightStartColor">#FCFFFFFF</Color>
                                            <Color x:Key="LinearBevelLightEndColor">#F4FFFFFF</Color>
                                            <Color x:Key="LinearBevelDarkStartColor">#E0FFFFFF</Color>
                                            <Color x:Key="LinearBevelDarkEndColor">#B2FFFFFF</Color>
                                            <Color x:Key="HoverLinearBevelLightStartColor">#FCFFFFFF</Color>
                                            <Color x:Key="HoverLinearBevelLightEndColor">#EAFFFFFF</Color>
                                            <Color x:Key="HoverLinearBevelDarkStartColor">#D8FFFFFF</Color>
                                            <Color x:Key="HoverLinearBevelDarkEndColor">#4CFFFFFF</Color>
                                        </Grid.Resources>
                                        <vsm:VisualStateManager.VisualStateGroups>
                                            <vsm:VisualStateGroup x:Name="CommonStates">
                                                <vsm:VisualStateGroup.Transitions>
                                                    <vsm:VisualTransition GeneratedDuration="0:0:0.1"
                                                                          To="MouseOver" />
                                                </vsm:VisualStateGroup.Transitions>
                                                <vsm:VisualState x:Name="Normal" />
                                                <vsm:VisualState x:Name="MouseOver">
                                                    <Storyboard>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelLightEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelDarkStartColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="rectangle"
                                                                                      Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                            <SplineColorKeyFrame KeyTime="00:00:00"
                                                                                 Value="{StaticResource HoverLinearBevelDarkEndColor}" />
                                                        </ColorAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                                <vsm:VisualState x:Name="Disabled">
                                                    <Storyboard>
                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual"
                                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                                  Value="0.6" />
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </vsm:VisualState>
                                            </vsm:VisualStateGroup>
                                        </vsm:VisualStateManager.VisualStateGroups>
                                        <Grid x:Name="ThumbVisual">
                                            <Rectangle Margin=".5,2.5,.5,2.5"
                                                       x:Name="Background"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Fill="{StaticResource Background}" />
                                            <Rectangle Margin="0,2,0,2"
                                                       x:Name="rectangle"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Stroke="#FF777777"
                                                       StrokeThickness="1">
                                                <Rectangle.Fill>
                                                    <LinearGradientBrush EndPoint="0.5,1.11"
                                                                         StartPoint="0.5,-0.11">
                                                        <GradientStop Color="{StaticResource LinearBevelLightStartColor}"
                                                                      Offset="0"
                                                                      x:Name="LinearBevelLightStart" />
                                                        <GradientStop Color="{StaticResource LinearBevelLightEndColor}"
                                                                      Offset="0.35"
                                                                      x:Name="LinearBevelLightEnd" />
                                                        <GradientStop Color="{StaticResource LinearBevelDarkStartColor}"
                                                                      Offset="0.35"
                                                                      x:Name="LinearBevelDarkStart" />
                                                        <GradientStop Color="{StaticResource LinearBevelDarkEndColor}"
                                                                      Offset="1"
                                                                      x:Name="LinearBevelDarkEnd" />
                                                    </LinearGradientBrush>
                                                </Rectangle.Fill>
                                            </Rectangle>
                                            <Rectangle Margin="1,3,1,3"
                                                       RadiusX="2.5"
                                                       RadiusY="2.5"
                                                       Fill="#00000000"
                                                       Stroke="White"
                                                       StrokeThickness="1" />
                                        </Grid>
                                    </Grid>
                                </ControlTemplate>
                            </Grid.Resources>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="MouseOver" />
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                      Value="0.5" />
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Grid x:Name="HorizontalRoot"
                                  Height="9">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <RepeatButton x:Name="HorizontalSmallDecrease"
                                              Width="16"
                                              IsTabStop="False"
                                              Template="{StaticResource HorizontalDecrementTemplate}"
                                              Grid.Column="0"
                                              Grid.RowSpan="2"
                                              Interval="50"
                                              Background="#FF107BC6" />
                                <RepeatButton x:Name="HorizontalLargeDecrease"
                                              Width="0"
                                              IsTabStop="False"
                                              Template="{StaticResource RepeatButtonTemplate}"
                                              Grid.Column="1"
                                              Grid.RowSpan="2"
                                              Interval="50" />
                                <Thumb MinWidth="10"
                                       x:Name="HorizontalThumb"
                                       Width="20"
                                       Template="{StaticResource HorizontalThumbTemplate}"
                                       Grid.Column="2"
                                       Grid.RowSpan="2" />
                                <RepeatButton x:Name="HorizontalLargeIncrease"
                                              IsTabStop="False"
                                              Template="{StaticResource RepeatButtonTemplate}"
                                              Grid.Column="3"
                                              Grid.RowSpan="2"
                                              Interval="50" />
                                <RepeatButton x:Name="HorizontalSmallIncrease"
                                              Width="16"
                                              IsTabStop="False"
                                              Template="{StaticResource HorizontalIncrementTemplate}"
                                              Grid.Column="4"
                                              Grid.RowSpan="2"
                                              Interval="50" />
                            </Grid>
                            <Grid x:Name="VerticalRoot"
                                  Visibility="Collapsed"
                                  Width="9">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Rectangle Grid.ColumnSpan="2"
                                           Grid.RowSpan="5"
                                           RadiusX="5"
                                           RadiusY="5"
                                           Fill="#FF343434" />
                                <Rectangle Margin="1,0,0,1"
                                           Grid.ColumnSpan="2"
                                           Grid.RowSpan="5"
                                           StrokeThickness="1"
                                           RadiusX="5"
                                           RadiusY="5"
                                           Fill="#FF343434" />
                                <RepeatButton Height="16"
                                              x:Name="VerticalSmallDecrease"
                                              IsTabStop="False"
                                              Template="{StaticResource VerticalDecrementTemplate}"
                                              Grid.ColumnSpan="2"
                                              Grid.Row="0"
                                              Interval="50"
                                              Foreground="#FFAAAAAA"
                                              Background="#FFAAAAAA" />
                                <RepeatButton Height="0"
                                              x:Name="VerticalLargeDecrease"
                                              IsTabStop="False"
                                              Template="{StaticResource RepeatButtonTemplate}"
                                              Grid.ColumnSpan="2"
                                              Grid.Row="1"
                                              Interval="50" />
                                <Thumb Height="20"
                                       MinHeight="10"
                                       x:Name="VerticalThumb"
                                       Template="{StaticResource VerticalThumbTemplate}"
                                       Grid.ColumnSpan="2"
                                       Grid.Row="2" />
                                <RepeatButton x:Name="VerticalLargeIncrease"
                                              IsTabStop="False"
                                              Template="{StaticResource RepeatButtonTemplate}"
                                              Grid.ColumnSpan="2"
                                              Grid.Row="3"
                                              Interval="50" />
                                <RepeatButton Height="16"
                                              x:Name="VerticalSmallIncrease"
                                              IsTabStop="False"
                                              Template="{StaticResource VerticalIncrementTemplate}"
                                              Grid.ColumnSpan="2"
                                              Grid.Row="4"
                                              Interval="50"
                                              Foreground="#FFAAAAAA"
                                              Background="#FF5A5A5A" />
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </vsm:Setter.Value>
            </vsm:Setter>
        </vsm:Style>

        <Style x:Key="ListBoxScrollViewrStyle"
               TargetType="ScrollViewer">
            <Setter Property="IsEnabled"
                    Value="true" />
            <Setter Property="Foreground"
                    Value="#FF000000" />
            <Setter Property="BorderBrush"
                    Value="#FFA4A4A4" />
            <Setter Property="BorderThickness"
                    Value="1" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Left" />
            <Setter Property="VerticalContentAlignment"
                    Value="Top" />
            <Setter Property="Cursor"
                    Value="Arrow" />
            <!--<Setter Property="TextAlignment" Value="Left"/>-->
            <!--<Setter Property="TextWrapping" Value="NoWrap"/>-->
            <Setter Property="FontSize"
                    Value="11" />
            <Setter Property="VerticalScrollBarVisibility"
                    Value="Visible" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ScrollViewer">
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1">
                            <Grid Background="{TemplateBinding Background}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Rectangle Grid.Column="1"
                                           Grid.Row="1"
                                           Fill="GhostWhite" />
                                <ScrollContentPresenter />
                                <ScrollBar Cursor="Arrow"
                                           x:Name="VerticalScrollBar"
                                           Width="9"
                                           Grid.Column="1"
                                           HorizontalAlignment="Right"
                                           Grid.Row="0"
                                           Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                           Orientation="Vertical"
                                           ViewportSize="{TemplateBinding ViewportHeight}"
                                           Maximum="{TemplateBinding ScrollableHeight}"
                                           Minimum="0"
                                           Value="{TemplateBinding VerticalOffset}"
                                           Style="{StaticResource ScrollBarStyle}" />
                                <ScrollBar Cursor="Arrow"
                                           Height="9"
                                           x:Name="HorizontalScrollBar"
                                           Grid.Column="0"
                                           Grid.Row="1"
                                           Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                           Orientation="Horizontal"
                                           ViewportSize="{TemplateBinding ViewportWidth}"
                                           Maximum="{TemplateBinding ScrollableWidth}"
                                           Minimum="0"
                                           Value="{TemplateBinding HorizontalOffset}" />
                            </Grid>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="StatusList"
               TargetType="ListBox">
            <Setter Property="HorizontalAlignment"
                    Value="Stretch" />
            <Setter Property="Height"
                    Value="250" />
            <Setter Property="ItemContainerStyle"
                    Value="{StaticResource StatusItemStyle}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBox">
                        <Grid x:Name="RootElement">
                            <Border Background="Black">
                                <ScrollViewer x:Name="ScrollViewer"
                                              Style="{StaticResource ListBoxScrollViewrStyle}"
                                              HorizontalScrollBarVisibility="Hidden"
                                              VerticalScrollBarVisibility="Visible">
                                    <ItemsPresenter />
                                </ScrollViewer>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Application.Resources>
</Application>